#ifndef MemberFunctionSlot_H
#define MemberFunctionSlot_H_CEGUIMemberFunctionSlot_h_
#include "SlotFunctorBase.h"
template<typename T>
class MemberFunctionSlot : public SlotFunctorBase
{
public:
    typedef bool(T::*MemberFunctionType)(const EventArgs&);

    MemberFunctionSlot(MemberFunctionType func, T* obj) :
        d_function(func),
        d_object(obj)
    {}

    virtual bool operator()(void* dispatcher,const EventArgs& args)
    {
        return (d_object->*d_function)(dispatcher,args);
    }

private:
    MemberFunctionType d_function;
    T* d_object;
};
#endif 
